package com.binvshe.binvshe.entity;

import com.binvshe.binvshe.account.Account;
import com.binvshe.binvshe.organization.entity.ClubEntity;
import com.binvshe.binvshe.organization.entity.OpusListEntity;
import com.binvshe.binvshe.organization.tag.TagBean;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Zoi.
 * E-mail：KyluZoi@gmail.com
 * 2017/1/18
 */

public class HomeEntity implements Serializable {

    /**
     * id : 366
     * title : 16年次元英雄预赛
     * media_type : image
     * user : {"user_id":100104,"wx_openid":null,"club":{"id":247,"im_group_id":"251721550095450544","user_id":100104,"name":"厦门太阳骑士团","catid":5,"portrait":"http://static.binvshe.com/static/modo/20161011160728625556_100*100.png","sign":null,"introduction":"","province":"福建","city":"厦门","longitude":0,"latitude":0,"name_py":"shamentaiyangqishituan","initial":"S","state":true,"create_time":1476173291000,"update_time":1476173291000,"cate_name":null,"member_count":0,"fans":0,"leader_id":null},"login_name":"18559668120","real_name":"万年芥末","nick_name":"万年芥末","gender":1,"portrait":"http://static.binvshe.com/static/modo/20160926221210000658.jpeg","longitude":0,"latitude":0,"birthday":null,"constellation":null,"phone":"18559668120","sign":null,"province":null,"city":null,"coin":0,"company":null,"locked":false,"initial":"W","fans":0,"in_club":true}
     * club : {"id":247,"im_group_id":"251721550095450544","user_id":100104,"name":"厦门太阳骑士团","catid":5,"portrait":"http://static.binvshe.com/static/modo/20161011160728625556_100*100.png","sign":null,"introduction":"","province":"福建","city":"厦门","longitude":0,"latitude":0,"name_py":"shamentaiyangqishituan","initial":"S","state":true,"create_time":1476173291000,"update_time":1476173291000,"cate_name":null,"member_count":0,"fans":0,"leader_id":null}
     * description : null
     * content : 赛后合照
     * recommend : false
     * comment_count : 1
     * like_count : 2
     * state : true
     * del : false
     * create_time : 1483378932000
     * update_time : 1483378932000
     * images : [{"id":2888,"url":"http://static.binvshe.com/static/modo/20170103014211657967_640*640.jpg","width":640,"height":640},{"id":2889,"url":"http://static.binvshe.com/static/modo/20170103014211678785_999*750.jpg","width":999,"height":750}]
     * chapters : []
     * tags : [{"id":2270,"name":"COS","tag_type":null},{"id":2271,"name":"比赛","tag_type":null}]
     * article_images : null
     * category : null
     * cover_image : null
     * type : null
     * view_count : 0
     * hot : 2
     * like : false
     * favorite : false
     */

    private int id;
    private String title;
    private String media_type;
    private Account user;
    private ClubEntity club;
    private String description;
    private String content;
    private boolean recommend;
    private int comment_count;
    private int like_count;
    private boolean state;
    private boolean del;
    private long create_time;
    private long update_time;
    private Object article_images;  //null
    private Object category;  //null
    private String cover_image;  //null
    private Object type;  // null
    private int view_count;
    private int hot;
    private boolean like;
    private boolean favorite;
    private int flag;
    private String friend;
    private List<OpusListEntity.ImagesEntity> images;
    private List<?> chapters;  //null
    private List<TagBean> tags;


    public String getFriend() {
        return friend;
    }

    public void setFriend(String friend) {
        this.friend = friend;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getMedia_type() {
        return media_type;
    }

    public void setMedia_type(String media_type) {
        this.media_type = media_type;
    }

    public Account getUser() {
        return user;
    }

    public void setUser(Account user) {
        this.user = user;
    }

    public ClubEntity getClub() {
        return club;
    }

    public void setClub(ClubEntity club) {
        this.club = club;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean isRecommend() {
        return recommend;
    }

    public void setRecommend(boolean recommend) {
        this.recommend = recommend;
    }

    public int getComment_count() {
        return comment_count;
    }

    public void setComment_count(int comment_count) {
        this.comment_count = comment_count;
    }

    public int getLike_count() {
        return like_count;
    }

    public void setLike_count(int like_count) {
        this.like_count = like_count;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

    public boolean isDel() {
        return del;
    }

    public void setDel(boolean del) {
        this.del = del;
    }

    public long getCreate_time() {
        return create_time;
    }

    public void setCreate_time(long create_time) {
        this.create_time = create_time;
    }

    public long getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(long update_time) {
        this.update_time = update_time;
    }

    public Object getArticle_images() {
        return article_images;
    }

    public void setArticle_images(Object article_images) {
        this.article_images = article_images;
    }

    public Object getCategory() {
        return category;
    }

    public void setCategory(Object category) {
        this.category = category;
    }

    public String getCover_image() {
        return cover_image;
    }

    public void setCover_image(String cover_image) {
        this.cover_image = cover_image;
    }

    public Object getType() {
        return type;
    }

    public void setType(Object type) {
        this.type = type;
    }

    public int getView_count() {
        return view_count;
    }

    public void setView_count(int view_count) {
        this.view_count = view_count;
    }

    public int getHot() {
        return hot;
    }

    public void setHot(int hot) {
        this.hot = hot;
    }

    public boolean isLike() {
        return like;
    }

    public void setLike(boolean like) {
        this.like = like;
    }

    public boolean isFavorite() {
        return favorite;
    }

    public void setFavorite(boolean favorite) {
        this.favorite = favorite;
    }

    public List<OpusListEntity.ImagesEntity> getImages() {
        return images;
    }

    public void setImages(List<OpusListEntity.ImagesEntity> images) {
        this.images = images;
    }

    public List<?> getChapters() {
        return chapters;
    }

    public void setChapters(List<?> chapters) {
        this.chapters = chapters;
    }

    public List<TagBean> getTags() {
        return tags;
    }

    public void setTags(List<TagBean> tags) {
        this.tags = tags;
    }


    public boolean getFlag() {
        if (flag == 0) {
            return false;//连载中
        } else {
            return true;//已完结
        }
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

}
